{% extends "adminbase.html" %}


{% block content %}
<h1>Updates</h1>
<small>
Text: just write what you want<br/>
Video: Post a <a href="http://www.youtube.com/" target="_blank">Youtube</a> link<br/>
Audio: Post a <a href="http://www.soundcloud.com/" target="_blank">Soundcloud</a> embed code (choose 'share' then copy the embed code, deselect "user html5 widget")<br/><br/>
</small>

<form action="/admins/postUpdateAdmin/" method="POST">{% csrf_token %}
	<input type="text" name="entry" style="height:30;width:100%"/>
	<input type="image" src="{{ STATIC_URL }}images/post_btn.jpg" alt='Submit Form' style="float:right"><br/><br/>
	<br />
	</form>

	{% for update in updates %}
	{%  if update.video_id %}
		<iframe width="560" height="315" src="http://www.youtube.com/embed/{{ update.video_id }}" frameborder="0" allowfullscreen></iframe><br />
	{% endif %}
	{% if update.content %}
		{{ update.content }} 
	{% endif %}
	{% if update.mp3_url %}
	{{ update.mp3_name }}
	<iframe height="100" width="100%" frameborder="0" src={{ update.mp3_url }}></iframe> 
	{% endif %}
	
	<small style="font-size:10;font-style:italic;float:right"><a href="/myprofile/deleteUpdate/{{ update.id }}/">delete</a></small>
	<br />
	{% endfor %}
{% endblock %}
